Optimal. Leaf size=200 \[ \frac {5 a^4 (7 A+4 C) \sin (c+d x)}{8 d}-\frac {(35 A-12 C) \sin (c+d x) \left (a^4 \sec (c+d x)+a^4\right )}{24 d}+\frac {1}{8} a^4 x (35 A+52 C)+\frac {4 a^4 C \tanh ^{-1}(\sin (c+d x))}{d}+\frac {(7 A+4 C) \sin (c+d x) \cos (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{8 d}+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^4}{4 d}+\frac {a A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^3}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.57, antiderivative size = 200, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {4087, 4017, 4018, 3996, 3770} \[ \frac {5 a^4 (7 A+4 C) \sin (c+d x)}{8 d}-\frac {(35 A-12 C) \sin (c+d x) \left (a^4 \sec (c+d x)+a^4\right )}{24 d}+\frac {(7 A+4 C) \sin (c+d x) \cos (c+d x) \left (a^2 \sec (c+d x)+a^2\right )^2}{8 d}+\frac {1}{8} a^4 x (35 A+52 C)+\frac {4 a^4 C \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a A \sin (c+d x) \cos ^2(c+d x) (a \sec (c+d x)+a)^3}{3 d}+\frac {A \sin (c+d x) \cos ^3(c+d x) (a \sec (c+d x)+a)^4}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3770
Rule 3996
Rule 4017
Rule 4018
Rule 4087
Rubi steps
\begin {align*} \int \cos ^4(c+d x) (a+a \sec (c+d x))^4 \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^4 \sin (c+d x)}{4 d}+\frac {\int \cos ^3(c+d x) (a+a \sec (c+d x))^4 (4 a A-a (A-4 C) \sec (c+d x)) \, dx}{4 a}\\ &=\frac {a A \cos ^2(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^4 \sin (c+d x)}{4 d}+\frac {\int \cos ^2(c+d x) (a+a \sec (c+d x))^3 \left (3 a^2 (7 A+4 C)-a^2 (7 A-12 C) \sec (c+d x)\right ) \, dx}{12 a}\\ &=\frac {a A \cos ^2(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^4 \sin (c+d x)}{4 d}+\frac {(7 A+4 C) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{8 d}+\frac {\int \cos (c+d x) (a+a \sec (c+d x))^2 \left (2 a^3 (35 A+36 C)-a^3 (35 A-12 C) \sec (c+d x)\right ) \, dx}{24 a}\\ &=\frac {a A \cos ^2(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^4 \sin (c+d x)}{4 d}+\frac {(7 A+4 C) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{8 d}-\frac {(35 A-12 C) \left (a^4+a^4 \sec (c+d x)\right ) \sin (c+d x)}{24 d}+\frac {\int \cos (c+d x) (a+a \sec (c+d x)) \left (15 a^4 (7 A+4 C)+96 a^4 C \sec (c+d x)\right ) \, dx}{24 a}\\ &=\frac {5 a^4 (7 A+4 C) \sin (c+d x)}{8 d}+\frac {a A \cos ^2(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^4 \sin (c+d x)}{4 d}+\frac {(7 A+4 C) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{8 d}-\frac {(35 A-12 C) \left (a^4+a^4 \sec (c+d x)\right ) \sin (c+d x)}{24 d}-\frac {\int \left (-3 a^5 (35 A+52 C)-96 a^5 C \sec (c+d x)\right ) \, dx}{24 a}\\ &=\frac {1}{8} a^4 (35 A+52 C) x+\frac {5 a^4 (7 A+4 C) \sin (c+d x)}{8 d}+\frac {a A \cos ^2(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^4 \sin (c+d x)}{4 d}+\frac {(7 A+4 C) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{8 d}-\frac {(35 A-12 C) \left (a^4+a^4 \sec (c+d x)\right ) \sin (c+d x)}{24 d}+\left (4 a^4 C\right ) \int \sec (c+d x) \, dx\\ &=\frac {1}{8} a^4 (35 A+52 C) x+\frac {4 a^4 C \tanh ^{-1}(\sin (c+d x))}{d}+\frac {5 a^4 (7 A+4 C) \sin (c+d x)}{8 d}+\frac {a A \cos ^2(c+d x) (a+a \sec (c+d x))^3 \sin (c+d x)}{3 d}+\frac {A \cos ^3(c+d x) (a+a \sec (c+d x))^4 \sin (c+d x)}{4 d}+\frac {(7 A+4 C) \cos (c+d x) \left (a^2+a^2 \sec (c+d x)\right )^2 \sin (c+d x)}{8 d}-\frac {(35 A-12 C) \left (a^4+a^4 \sec (c+d x)\right ) \sin (c+d x)}{24 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 2.40, size = 375, normalized size = 1.88 \[ \frac {a^4 \cos ^2(c+d x) (\cos (c+d x)+1)^4 \sec ^8\left (\frac {1}{2} (c+d x)\right ) \left (A+C \sec ^2(c+d x)\right ) \left (\frac {96 (7 A+4 C) \sin (c) \cos (d x)}{d}+\frac {24 (7 A+C) \sin (2 c) \cos (2 d x)}{d}+\frac {96 (7 A+4 C) \cos (c) \sin (d x)}{d}+\frac {24 (7 A+C) \cos (2 c) \sin (2 d x)}{d}+\frac {32 A \sin (3 c) \cos (3 d x)}{d}+\frac {3 A \sin (4 c) \cos (4 d x)}{d}+\frac {32 A \cos (3 c) \sin (3 d x)}{d}+\frac {3 A \cos (4 c) \sin (4 d x)}{d}+12 x (35 A+52 C)+\frac {96 C \sin \left (\frac {d x}{2}\right )}{d \left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {96 C \sin \left (\frac {d x}{2}\right )}{d \left (\sin \left (\frac {c}{2}\right )+\cos \left (\frac {c}{2}\right )\right ) \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )}-\frac {384 C \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}{d}+\frac {384 C \log \left (\sin \left (\frac {1}{2} (c+d x)\right )+\cos \left (\frac {1}{2} (c+d x)\right )\right )}{d}\right )}{768 (A \cos (2 (c+d x))+A+2 C)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 158, normalized size = 0.79 \[ \frac {3 \, {\left (35 \, A + 52 \, C\right )} a^{4} d x \cos \left (d x + c\right ) + 48 \, C a^{4} \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - 48 \, C a^{4} \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + {\left (6 \, A a^{4} \cos \left (d x + c\right )^{4} + 32 \, A a^{4} \cos \left (d x + c\right )^{3} + 3 \, {\left (27 \, A + 4 \, C\right )} a^{4} \cos \left (d x + c\right )^{2} + 32 \, {\left (5 \, A + 3 \, C\right )} a^{4} \cos \left (d x + c\right ) + 24 \, C a^{4}\right )} \sin \left (d x + c\right )}{24 \, d \cos \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.53, size = 244, normalized size = 1.22 \[ \frac {96 \, C a^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 96 \, C a^{4} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {48 \, C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1} + 3 \, {\left (35 \, A a^{4} + 52 \, C a^{4}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (105 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 84 \, C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 385 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 276 \, C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 511 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 300 \, C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 279 \, A a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 108 \, C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{4}}}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.53, size = 191, normalized size = 0.96 \[ \frac {A \,a^{4} \sin \left (d x +c \right ) \left (\cos ^{3}\left (d x +c \right )\right )}{4 d}+\frac {27 A \,a^{4} \cos \left (d x +c \right ) \sin \left (d x +c \right )}{8 d}+\frac {35 A \,a^{4} x}{8}+\frac {35 A \,a^{4} c}{8 d}+\frac {a^{4} C \sin \left (d x +c \right ) \cos \left (d x +c \right )}{2 d}+\frac {13 a^{4} C x}{2}+\frac {13 C \,a^{4} c}{2 d}+\frac {4 A \sin \left (d x +c \right ) \left (\cos ^{2}\left (d x +c \right )\right ) a^{4}}{3 d}+\frac {20 A \,a^{4} \sin \left (d x +c \right )}{3 d}+\frac {4 a^{4} C \sin \left (d x +c \right )}{d}+\frac {4 a^{4} C \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {a^{4} C \tan \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.37, size = 194, normalized size = 0.97 \[ -\frac {128 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{4} - 3 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{4} - 144 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{4} - 96 \, {\left (d x + c\right )} A a^{4} - 24 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{4} - 576 \, {\left (d x + c\right )} C a^{4} - 192 \, C a^{4} {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} - 384 \, A a^{4} \sin \left (d x + c\right ) - 384 \, C a^{4} \sin \left (d x + c\right ) - 96 \, C a^{4} \tan \left (d x + c\right )}{96 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 2.82, size = 234, normalized size = 1.17 \[ \frac {20\,A\,a^4\,\sin \left (c+d\,x\right )}{3\,d}+\frac {4\,C\,a^4\,\sin \left (c+d\,x\right )}{d}+\frac {35\,A\,a^4\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{4\,d}+\frac {13\,C\,a^4\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {8\,C\,a^4\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {4\,A\,a^4\,{\cos \left (c+d\,x\right )}^2\,\sin \left (c+d\,x\right )}{3\,d}+\frac {A\,a^4\,{\cos \left (c+d\,x\right )}^3\,\sin \left (c+d\,x\right )}{4\,d}+\frac {C\,a^4\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )}+\frac {27\,A\,a^4\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{8\,d}+\frac {C\,a^4\,\cos \left (c+d\,x\right )\,\sin \left (c+d\,x\right )}{2\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________